#pragma once
#include <QByteArray>

struct History {
    quint16 roomId;
    QByteArray time;

    History(const quint16& roomId, const QByteArray& time) : roomId(roomId), time(time) {}

    const QByteArray toByteArray() const {
        return QByteArray::number(roomId) + ',' + time;
    }
};

namespace HistoryHelper {
    History read(const QByteArray& data);
}